/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package dao;

import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author 07200765
 */
public class Conexao {
    
    public boolean conectar(String url, String user, String pwd) throws SQLException {
        try {
            Class.forName("com.mysql.jdbc.Driver");
            Connection con = DriverManager.getConnection(url, user, pwd);
            System.out.println("conectou");
            return true;
        }
        catch (ClassNotFoundException e){
            System.out.println("Classe não encontrada");
            return false;
        }
    }
}
/*Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection con = DriverManager.getConnection( url, username, password );
/*

//con.close();


}
/*while (rs.next()) {
    String coluna1 = rs.getString("coluna1");
    int coluna2 = rs.getInt("coluna2");
    Date coluna3 = rs.getDate("coluna3");
} */ 
